import React from 'react';
import { history } from 'umi';
import { Button } from 'antd';

const Details = (props) => {
  // console.log(props)
  const {
    location: { state },
  } = props;
  // console.log(state + '1111')
  console.log(state.params.key);
  const handleGoBack = () => {
    history.push('/test', { params: { ...state.params } });
  };
  return (
    <div>
      <Button onClick={handleGoBack}>返回</Button>
    </div>
  );
};

export default Details;
